<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		<div id="div1">
			div1
		</div>
	</body>
</html>
<script>
	alert("hello js");
	document.write("hello word");/*写入到html文档中 即页面中*/
	/*获取到id为div1的元素，并修改其内容为hello div1*/
	document.getElementById("div1").innerHTML="hello div1";
	/*在控制台打印hello word*/
	console.log("hello word");
</script>
